//
//  Primer_Functions_DemoVC.swift
//  APSwift
//
//  Created by jianbo.pei on 2022/8/23.
//

import UIKit

class Primer_Functions_DemoVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        test1()
    }
    
    private func test1() {
        let sum = sum(num1: 2, num2: 3)
        print("sum is \(sum)")
        /// sum is 5
    }
    
    private func sum(num1: Int, num2: Int) -> Int {
        /// 隐式返回（Implicit Return）
        /// 如果整个函数是一个单一表达式，那么函数会隐式返回这个表达式
        num1 + num2
    }

}
